import { LogUtil } from '../../Util/LogUtil';

/**
 *  红点工具类
 *  功能类红点：Func+ID+RedDotType（红点类型）
 *  活动类红点：Act+ID+RedDotType（红点类型）
 */
export class RedDotUtilities {
  static readonly separator: string = 'u';
  static getUnitFunc(id: number): () => number;
  static getUnitFunc(id: string): () => number;
  static getUnitFunc(id: number | string): () => number {
    if (typeof id === 'string') {
      const func = this[id];
      if (func) {
        return func;
      }
      LogUtil.e('RedDotUtilities', `getUnitFunc: ${id} 红点运算没有定义`);
      return RedDotUtilities.defaultFunc;
    } else {
      const func = this[this.separator + id];
      if (func) {
        return func;
      }
      LogUtil.e('RedDotUtilities', `getUnitFunc: ${id} 红点运算没有定义`);
      return RedDotUtilities.defaultFunc;
    }
  }

  static defaultFunc(): number {
    return 0;
  }

  /** 英雄红点 */
  static u1001(): number {
    return 0;
  }

  /** 装备红点 */
  static u1002(): number {
    return 0;
  }

  /** 背包红点 */
  static u1003(): number {
    return 0;
  }

  /** 好友 */
  static u2001(): number {
    return 0;
  }

  /** 邮件 */
  static u2002(): number {
    return 0;
  }

  //#region 活动红点
  static u1000(): number {
    return 0;
  }

  static u10000(): number {
    return 0;
  }

  static u10001(): number {
    return 0;
  }
  static u10002(): number {
    return 0;
  }
  static u11000(): number {
    return 0;
  }
  static u12000(): number {
    return 0;
  }
  static u13000(): number {
    return 0;
  }
  static u20000(): number {
    return 0;
  }
  static u21000(): number {
    return 0;
  }
  static u22000(): number {
    return 0;
  }
}
